home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3767 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: cdn_news.telecom.com.au!usenet
  2. From: Jeff PAton <jpaton@vitgexec.telecom.com.au>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Problem...Problem!
  5. Date: 31 Jan 1996 02:40:53 GMT
  6. Organization: Telstra
  7. Message-ID: <4emkrl$qs@cdn_news.telecom.com.au>
  8. References: <4el09q$6im@ratree.psu.ac.th>
  9. NNTP-Posting-Host: 144.136.190.172
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
  14.  
  15. s3610165@maliwan.psu.ac.th (Sanon CHAOCHAIYAPORN) wrote:
  16. >Dear all
  17. >        This is a iteration method program. It use to find three values, 
  18. >a b and c. This program will finish when variables, t[], are less than or 
  19. >equal an error value, ERR. But my program has not been runing. Please, 
  20. >advice me...:~( Thanks for your attention.
  21. >
  22. [snip]
  23. |
  24. |display()
  25. |{
  26. |  printf("%10.4f",v[i]);
  27. |  printf("%10.4f",v[i+1]);
  28. |  printf("%10.4f",v[i+2]);
  29. |  printf("%10.4f",v[i+3]);
  30. |  printf("%10.4f",v[i+4]);
  31. |  printf("%10.4f",v[i+5]);
  32. |  printf("%10.4f",v[i+6]);
  33. |  printf("%10.4f",v[i+7]);
  34. |}
  35. |
  36.  
  37. My previous reply assumed that you needed *all* t[i] to be <= ERR for the
  38. program to terminate.
  39.  
  40. Also, your display() routine probably isn't working, or else it is by luck - you
  41. have not initialised i appropriately (and why isn't a for loop used here as well?)
  42.  
  43.